﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

namespace ColorApplication
{
    public partial class SiteOld : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] != null && Request.QueryString["id"] == ConfigurationManager.AppSettings["AdminID"].ToString())
            {
                AnchorFileuploadLink.Visible = true;
                contactusLink.Visible = false;
                aboutLink.Visible = false;
                policyLink.Visible = false;
                FaqLink.Visible = false;
                Faq2Link.Visible = false;
                //demoLink.Visible = false;
                ReportLink.Visible = true;
                ColorsLink.Visible = true;
                AttributesfamiliesLink.Visible = true;
                ColorsAttributeLink.Visible = true;
                SubColorsLink.Visible = true;
                AttributeLink.Visible = true;
                AttributeXAttributefamiliesLink.Visible = true;
                SettingLink.Visible = true;
                OffsetLink.Visible = true;
                EditContentLink.Visible = true;
                AnchorFileuploadLink.NavigateUrl = "~/FileUpload.aspx?id=" + Request.QueryString["id"];
                ColorsLink.NavigateUrl = "~/color/Colors.aspx" + "?id=" + Request.QueryString["id"];
                AttributesfamiliesLink.NavigateUrl = "~/color/Attributesfamilies.aspx" + "?id=" + Request.QueryString["id"];
                ColorsAttributeLink.NavigateUrl = "~/color/ColorsAttribute.aspx" + "?id=" + Request.QueryString["id"];
                SubColorsLink.NavigateUrl = "~/color/SubColors.aspx" + "?id=" + Request.QueryString["id"];
                AttributeLink.NavigateUrl = "~/color/Attribute.aspx" + "?id=" + Request.QueryString["id"];
                AttributeXAttributefamiliesLink.NavigateUrl = "~/color/AttributeXAttributefamilies.aspx" + "?id=" + Request.QueryString["id"];
                ReportLink.NavigateUrl = "~/color/Reports.aspx" + "?id=" + Request.QueryString["id"];
                HomeLink.NavigateUrl = "~/Default.aspx" + "?id=" + Request.QueryString["id"];
                SettingLink.NavigateUrl = "~/Settings.aspx" + "?id=" + Request.QueryString["id"];
                OffsetLink.NavigateUrl = "~/color/Offset.aspx" + "?id=" + Request.QueryString["id"];
                EditContentLink.NavigateUrl = "~/color/EditContent.aspx" + "?id=" + Request.QueryString["id"];
                AnchorFileuploadLink1.Visible = true;
                contactusLink1.Visible = false;
                aboutLink1.Visible = false;
                policyLink1.Visible = false;
                //demoLink1.Visible = false;
                ReportLink1.Visible = true;
                ColorsLink1.Visible = true;
                AttributesfamiliesLink1.Visible = true;
                ColorsAttributeLink1.Visible = true;
                SubColorsLink1.Visible = true;
                AttributeLink1.Visible = true;
                SettingLink1.Visible = true;
                OffsetLink1.Visible = true;
                EditContentLink1.Visible = true;
                AttributeXAttributefamiliesLink1.Visible = true;
                AnchorFileuploadLink1.NavigateUrl = "~/FileUpload.aspx?id=" + Request.QueryString["id"];
               ColorsLink1.NavigateUrl = "~/color/Colors.aspx" + "?id=" + Request.QueryString["id"];
                AttributesfamiliesLink1.NavigateUrl = "~/color/Attributesfamilies.aspx" + "?id=" + Request.QueryString["id"];
                ColorsAttributeLink1.NavigateUrl = "~/color/ColorsAttribute.aspx" + "?id=" + Request.QueryString["id"];
                SubColorsLink1.NavigateUrl = "~/color/SubColors.aspx" + "?id=" + Request.QueryString["id"];
                AttributeLink1.NavigateUrl = "~/color/Attribute.aspx" + "?id=" + Request.QueryString["id"];
                AttributeXAttributefamiliesLink1.NavigateUrl = "~/color/Attributesfamilies.aspx" + "?id=" + Request.QueryString["id"];
                ReportLink1.NavigateUrl = "~/color/Reports.aspx" + "?id=" + Request.QueryString["id"];
                HomeLink1.NavigateUrl = "~/Default.aspx" + "?id=" + Request.QueryString["id"];
                SettingLink1.NavigateUrl = "~/Settings.aspx" + "?id=" + Request.QueryString["id"];
                EditContentLink1.NavigateUrl = "~/color/EditContent.aspx" + "?id=" + Request.QueryString["id"];
                  OffsetLink1.NavigateUrl = "~/color/Offset.aspx" + "?id=" + Request.QueryString["id"];
         }
            else
            {
                AnchorFileuploadLink.Visible = true;
                contactusLink.Visible = true;

                string text="mailto:" + ConfigurationManager.AppSettings["ContactEmail"].ToString() +"?subject=" + ConfigurationManager.AppSettings["ContactEmailSubject"].ToString() +"&amp;body=";

               
                contactusLink.NavigateUrl = text;
                contactusLink1.NavigateUrl = text;
                aboutLink.Visible = true;
                FaqLink.Visible = true;
                Faq2Link.Visible = true;
                policyLink.Visible = true;
                //demoLink.Visible = true;
                ReportLink.Visible = false;
                ColorsLink.Visible = false;
                AttributesfamiliesLink.Visible = false;
                ColorsAttributeLink.Visible = false;
                SubColorsLink.Visible = false;
                AttributeLink.Visible = false;
                AttributeXAttributefamiliesLink.Visible = false;
                SettingLink.Visible = false;
                OffsetLink.Visible = false;
                EditContentLink.Visible = false;
               AnchorFileuploadLink1.Visible = true;
                contactusLink1.Visible = true;
                aboutLink1.Visible = true;
                policyLink1.Visible = true;
                //demoLink1.Visible = true;
                ReportLink1.Visible = false;
                ColorsLink1.Visible = false;
                AttributesfamiliesLink1.Visible = false;
                ColorsAttributeLink1.Visible = false;
                SubColorsLink1.Visible = false;
                AttributeLink1.Visible = false;
                AttributeXAttributefamiliesLink1.Visible = false;
                SettingLink1.Visible = false;
                OffsetLink1.Visible = false;
                EditContentLink1.Visible = false;
          }
        }
    }
}
